package com.tcwlkj.uuService.model;

import com.tcwlkj.uuService.utils.Tools;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.RoundingMode;

import static android.graphics.Color.RED;

/**
 * Created by Administrator on 2017/10/26 0026.
 */

public class OrderModel implements Serializable {
    private String ID;//订单ID
    private String OrderType;//订单类型（0实时、1预约、2指派）
    private String SendType;//业务类型（10送、20取、30买、40帮、50排）
    private String SendSubType;//子业务类型（301就近买）
    private String SubscribeType;//预约类型（920取件、910送件）
    private String HotBox;//是否需要保温箱（0否、1是）
    private String PayType;//支付类型（0实时、1货到）
    private String GradMode;//接单方式（0抢单、1系统指派、2客服指派）
    private String State;//状态（1待接单）
    private String AddTime;//发单时间
    private String BegAddress;//起始地地址
    private String BegLocLng;//起始地位置经度值
    private String BegLocLat;//起始的位置纬度值
    private String EndAddress;//终点位置地址
    private String EndLocLng;//终点位置经度值
    private String EndLocLat;//终点位置纬度值
    private String Distance;//起点到终点距离
    private String BegUserMobile;//起点联系电话
    private String BegUserName;//起始地联系人
    private String EndUserMobile;//终点联系电话
    private String EndUserName;//终点联系人
    private String TotalMoney;//总金额
    private String PayPriceOffMoney;//总优惠
    private String PayGoodsMoney;//商品金额
    private String PayCollectingMoney;//代收金额
    private String PayInsureMoney;//投保金额
    private String PayUserFeeMoney;//用户小费
    private String SysAddMoney;//系统加价
    private String DriverFreightMoney;//跑男总收入（含小费与加价）
    private String Goods;//商品名称
    private String Remarks;//备注
    private String DTakeDist;//距跑男当前位置距离
    private String UMobile;//发单人电话
    private String UName;//发单人名称
    private String FirstPushTime; //首单推送时间
    private String ExTimeSpan; //排队时间
    private String HelpInfo; //帮忙信息
    private String Code; //订单编号
    private String TotalTimeSpan;//
    private String AgentID;//代理id
    private String UType;//用户类型（1.用户, 2.商户）
    private String UserID;//用户ID
    private String PayTime;//支付时间
    private String PayFreightMoney;//应支付跑腿费
    private String NeedPayMoney;//应支付金额
    private String CityID;//城市id
    private String DMobile;//跑男联系方式
    private String DName;//跑男姓名
    private String GrabTime;//抢单时间
    private String PaySysFareMoney;//应支付加价金额
    private String UserFreightMoney;//用户跑腿费
    private String DriverID;//跑男ID
    private String PickupTime;//取货时间
    private String State4Time;//开始排队时间
    private String State6Time;//结束排队时间

    private String QuickOpers;//物品类型
    private String QuickType;//物品类型ID

    private String SubscribeTime;//预约时间

    private String EstimateFinishTime;//预计送达时间
    private String EstimatePickTime;//预计取件时间
    private String BegNote;
    private String BegShowAddress;
    private String BegTitle;
    private String BegUID;

    private String EndNote;
    private String EndShowAddress;
    private String EndTitle;
    private String EndUID;

    private String FinishTime;

    private String DUCallFlag;//判断打电话状态

    private String OrderCode;

    public String getFinishTime() {
        return FinishTime;
    }

    public void setFinishTime(String finishTime) {
        FinishTime = finishTime;
    }

    public String getDUCallFlag() {
        return DUCallFlag;
    }

    public void setDUCallFlag(String DUCallFlag) {
        this.DUCallFlag = DUCallFlag;
    }

    public String getOrderCode() {
        return OrderCode;
    }

    public void setOrderCode(String orderCode) {
        OrderCode = orderCode;
    }

    public String getSubscribeTime() {

        return Tools.yyyytoMM(SubscribeTime);
    }

    public void setSubscribeTime(String subscribeTime) {
        SubscribeTime = subscribeTime;
    }

    public String getEstimateFinishTime() {

        return Tools.yyyytoHH(EstimateFinishTime);
    }

    public void setEstimateFinishTime(String estimateFinishTime) {
        EstimateFinishTime = estimateFinishTime;
    }

    public String getEstimatePickTime() {
        return Tools.yyyytoHH(EstimatePickTime);
    }

    public void setEstimatePickTime(String estimatePickTime) {
        EstimatePickTime = estimatePickTime;
    }

    public String getBegNote() {
        return BegNote;
    }

    public void setBegNote(String begNote) {
        BegNote = begNote;
    }

    public String getBegShowAddress() {
        return BegShowAddress;
    }

    public void setBegShowAddress(String begShowAddress) {
        BegShowAddress = begShowAddress;
    }

    public String getBegTitle() {
        return BegTitle;
    }

    public void setBegTitle(String begTitle) {
        BegTitle = begTitle;
    }

    public String getBegUID() {
        return BegUID;
    }

    public void setBegUID(String begUID) {
        BegUID = begUID;
    }

    public String getEndNote() {
        return EndNote;
    }

    public void setEndNote(String endNote) {
        EndNote = endNote;
    }

    public String getEndShowAddress() {
        return EndShowAddress;
    }

    public void setEndShowAddress(String endShowAddress) {
        EndShowAddress = endShowAddress;
    }

    public String getEndTitle() {
        return EndTitle;
    }

    public void setEndTitle(String endTitle) {
        EndTitle = endTitle;
    }

    public String getEndUID() {
        return EndUID;
    }

    public void setEndUID(String endUID) {
        EndUID = endUID;
    }

    public String getQuickOpers() {
        return QuickOpers;
    }

    public void setQuickOpers(String quickOpers) {
        QuickOpers = quickOpers;
    }

    public String getQuickType() {
        return QuickType;
    }

    public void setQuickType(String quickType) {
        QuickType = quickType;
    }

    public String getDMobile() {
        return DMobile;
    }

    public void setDMobile(String DMobile) {
        this.DMobile = DMobile;
    }

    public String getDName() {
        return DName;
    }

    public void setDName(String DName) {
        this.DName = DName;
    }

    public String getGrabTime() {
        return GrabTime;
    }

    public void setGrabTime(String grabTime) {
        GrabTime = grabTime;
    }

    public String getPaySysFareMoney() {
        return PaySysFareMoney;
    }

    public void setPaySysFareMoney(String paySysFareMoney) {
        PaySysFareMoney = paySysFareMoney;
    }

    public String getUserFreightMoney() {
        return UserFreightMoney;
    }

    public void setUserFreightMoney(String userFreightMoney) {
        UserFreightMoney = userFreightMoney;
    }

    public String getDriverID() {
        return DriverID;
    }

    public void setDriverID(String driverID) {
        DriverID = driverID;
    }

    public String getPickupTime() {
        return PickupTime;
    }

    public void setPickupTime(String pickupTime) {
        PickupTime = pickupTime;
    }

    public String getState4Time() {
        return State4Time;
    }

    public void setState4Time(String state4Time) {
        State4Time = state4Time;
    }

    public String getState6Time() {
        return State6Time;
    }

    public void setState6Time(String state6Time) {
        State6Time = state6Time;
    }

    public String getGoods() {
        return Goods;
    }

    public void setGoods(String goods) {
        Goods = goods;
    }

    public String getNeedPayMoney() {
        return NeedPayMoney;
    }

    public void setNeedPayMoney(String needPayMoney) {
        NeedPayMoney = needPayMoney;
    }

    public String getCityID() {
        return CityID;
    }

    public void setCityID(String cityID) {
        CityID = cityID;
    }

    public String getAgentID() {
        return AgentID;
    }

    public void setAgentID(String agentID) {
        AgentID = agentID;
    }

    public String getUType() {
        return UType;
    }

    public void setUType(String UType) {
        this.UType = UType;
    }

    public String getUserID() {
        return UserID;
    }

    public void setUserID(String userID) {
        UserID = userID;
    }

    public String getPayTime() {
        return PayTime;
    }

    public void setPayTime(String payTime) {
        PayTime = payTime;
    }

    public String getPayFreightMoney() {
        return PayFreightMoney;
    }

    public void setPayFreightMoney(String payFreightMoney) {
        PayFreightMoney = payFreightMoney;
    }

    public String getTotalTimeSpan() {
        return TotalTimeSpan;
    }

    public void setTotalTimeSpan(String totalTimeSpan) {
        TotalTimeSpan = totalTimeSpan;
    }

    public String getCode() {
        return Code;
    }

    public void setCode(String code) {
        Code = code;
    }

    public String getFirstPushTime() {
        return FirstPushTime;
    }

    public void setFirstPushTime(String firstPushTime) {
        FirstPushTime = firstPushTime;
    }

    public String getExTimeSpan() {
        return ExTimeSpan;
    }

    public void setExTimeSpan(String exTimeSpan) {
        ExTimeSpan = exTimeSpan;
    }

    public String getHelpInfo() {
        return HelpInfo;
    }

    public void setHelpInfo(String helpInfo) {
        HelpInfo = helpInfo;
    }

    public String getID() {
        return ID;
    }

    public void setID(String ID) {
        this.ID = ID;
    }

    public String getOrderType() {
        return OrderType;
    }

    public void setOrderType(String orderType) {
        OrderType = orderType;
    }

    public String getSendType() {
        return SendType;
    }

    public void setSendType(String sendType) {
        SendType = sendType;
    }

    public String getSendSubType() {
        return SendSubType;
    }

    public void setSendSubType(String sendSubType) {
        SendSubType = sendSubType;
    }

    public String getSubscribeType() {
        return SubscribeType;
    }

    public void setSubscribeType(String subscribeType) {
        SubscribeType = subscribeType;
    }

    public String getHotBox() {
        return HotBox;
    }

    public void setHotBox(String hotBox) {
        HotBox = hotBox;
    }

    public String getPayType() {
        return PayType;
    }

    public void setPayType(String payType) {
        PayType = payType;
    }

    public String getState() {
        return State;
    }

    public void setState(String state) {
        State = state;
    }

    public String getGradMode() {
        return GradMode;
    }

    public void setGradMode(String gradMode) {
        GradMode = gradMode;
    }

    public String getAddTime() {
        return AddTime;
    }

    public void setAddTime(String addTime) {
        AddTime = addTime;
    }

    public String getBegAddress() {
        return BegAddress;
    }

    public void setBegAddress(String begAddress) {
        BegAddress = begAddress;
    }

    public String getBegLocLng() {
        return BegLocLng;
    }

    public void setBegLocLng(String begLocLng) {
        BegLocLng = begLocLng;
    }

    public String getBegLocLat() {
        return BegLocLat;
    }

    public void setBegLocLat(String begLocLat) {
        BegLocLat = begLocLat;
    }

    public String getEndAddress() {
        return EndAddress;
    }

    public void setEndAddress(String endAddress) {
        EndAddress = endAddress;
    }

    public String getEndLocLng() {
        return EndLocLng;
    }

    public void setEndLocLng(String endLocLng) {
        EndLocLng = endLocLng;
    }

    public String getEndLocLat() {
        return EndLocLat;
    }

    public void setEndLocLat(String endLocLat) {
        EndLocLat = endLocLat;
    }


    public String getPushDistance(){
        return Distance;
    }


    public String getDistance() {
        if (Double.valueOf(Distance) < 1000) {
            return Math.ceil(Double.valueOf(Distance)) + "m";
        } else {
            return new java.text.DecimalFormat("#.00").format(Double.valueOf(Distance) / 1000) + "km";
        }
    }

    public void setDistance(String distance) {
        Distance = distance;
    }

    public String getBegUserMobile() {
        return BegUserMobile;
    }

    public void setBegUserMobile(String begUserMobile) {
        BegUserMobile = begUserMobile;
    }

    public String getBegUserName() {
        return BegUserName;
    }

    public void setBegUserName(String begUserName) {
        BegUserName = begUserName;
    }

    public String getEndUserMobile() {
        return EndUserMobile;
    }

    public void setEndUserMobile(String endUserMobile) {
        EndUserMobile = endUserMobile;
    }

    public String getEndUserName() {
        return EndUserName;
    }

    public void setEndUserName(String endUserName) {
        EndUserName = endUserName;
    }

    public String getTotalMoney() {
        return new java.text.DecimalFormat("#.00").format(Double.valueOf(TotalMoney)).toString();
    }

    public void setTotalMoney(String totalMoney) {
        TotalMoney = totalMoney;
    }

    public String getPayPriceOffMoney() {
        return PayPriceOffMoney;
    }

    public void setPayPriceOffMoney(String payPriceOffMoney) {
        PayPriceOffMoney = payPriceOffMoney;
    }

    public String getPayGoodsMoney() {
        BigDecimal bd = new BigDecimal(PayGoodsMoney);
        return bd.setScale(2, RoundingMode.HALF_UP).toString();
    }

    public void setPayGoodsMoney(String payGoodsMoney) {
        PayGoodsMoney = payGoodsMoney;
    }

    public String getPayCollectingMoney() {
        return PayCollectingMoney;
    }

    public void setPayCollectingMoney(String payCollectingMoney) {
        PayCollectingMoney = payCollectingMoney;
    }

    public String getPayInsureMoney() {
        BigDecimal bd = new BigDecimal(PayInsureMoney);
        return bd.setScale(2, RoundingMode.HALF_UP).toString();
    }

    public void setPayInsureMoney(String payInsureMoney) {
        PayInsureMoney = payInsureMoney;
    }

    public String getPayUserFeeMoney() {
        BigDecimal bd = new BigDecimal(PayUserFeeMoney);
        return bd.setScale(2, RoundingMode.HALF_UP).toString() + "元";
    }

    public void setPayUserFeeMoney(String payUserFeeMoney) {
        PayUserFeeMoney = payUserFeeMoney;
    }

    public String getSysAddMoney() {
        BigDecimal bd = new BigDecimal(SysAddMoney);
        return bd.setScale(2, RoundingMode.HALF_UP).toString() + "元";
    }

    public void setSysAddMoney(String sysAddMoney) {
        SysAddMoney = sysAddMoney;
    }

    public String getDriverFreightMoney() {
        BigDecimal bd = new BigDecimal(DriverFreightMoney);
        return bd.setScale(2, RoundingMode.HALF_UP).toString();
    }

    public void setDriverFreightMoney(String driverFreightMoney) {
        DriverFreightMoney = driverFreightMoney;
    }

    public String getRemarks() { return Remarks; }

    public void setRemarks(String remarks) {
        Remarks = remarks;
    }

    public String getDTakeDist() {
        return DTakeDist;
    }

    public void setDTakeDist(String DTakeDist) {
        this.DTakeDist = DTakeDist;
    }

    public String getUMobile() {
        return UMobile;
    }

    public void setUMobile(String UMobile) {
        this.UMobile = UMobile;
    }

    public String getUName() {
        return UName;
    }

    public void setUName(String UName) {
        this.UName = UName;
    }


    public String getDistancePaonan() {
        if (Double.valueOf(DTakeDist) < 1000) {
            return Math.ceil(Double.valueOf(DTakeDist)) + "米";
        } else {
            return new java.text.DecimalFormat("#.00").format(Double.valueOf(DTakeDist) / 1000) + "公里";
        }
    }
}
